\documentclass{article}
% translate with >> pdflatex -shell-escape <file>

% This file is used as unit test for pgfplots, copyright by Christian Feuersaenger.
% 
% See
%   http://pgfplots.sourceforge.net/pgfplots.pdf
% for pgfplots.
%
% Any required input files (for <plot table> or <plot file> or the table package) can be downloaded
% at
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/
% and
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/

\usepackage{pgfplots}
\pgfplotsset{compat=1.4}

\pagestyle{empty}

\begin{document}
	\pgfplotsset{samples=10,xlabel=x,ylabel=y}
\begin{tikzpicture}
	 \begin{axis}[title={same with z buffer=sort}]
	 \addplot3[surf,id=3d_3,z buffer=sort,samples=20,samples y=50] function{sin(x) * cos(y)};
	 \end{axis}
 \end{tikzpicture}
\end{document}
